package hutoolandguava;

import com.google.common.collect.Lists;
import lombok.Data;
import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;

@Data
public class Dog implements Serializable {
    private String name = "wangwang";
    private int age = 3;
    private List<String> list;

    public static void main(String[] args)  {
        Object obj = new Object();
        WeakReference weakRef = new WeakReference(obj);
        while(true){
            if(weakRef.get()!=null){
                System.out.println("weakRef is not null");
            } else{
                break;
            }
        }
    }
}